var arr = ['a', 'b', 'c', 'd'];
for(let [i,e] of arr.entries()) {
    console.log(e);
}